package com.laolei.test.api.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.laolei.core.exception.ExceptionLevel;
import com.laolei.core.model.Entity;
import com.laolei.core.model.SysModel;

public class YoudaoRelust<T> extends SysModel implements Entity<T> {
	private static final long serialVersionUID = 1L;
	private int errorCode;
	private String query;
	private String[] translation;
	private T basic;
	private YouDaoWeb[] web;

	public int getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(int errorCode) {
		this.errorCode = errorCode;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public String[] getTranslation() {
		return translation;
	}

	public void setTranslation(String[] translation) {
		this.translation = translation;
	}

	public T getBasic() {
		return basic;
	}

	public void setBasic(T basic) {
		this.basic = basic;
	}

	public YouDaoWeb[] getWeb() {
		return web;
	}

	public void setWeb(YouDaoWeb[] web) {
		this.web = web;
	}

	@Override
	@JsonIgnore
	public T getEntity() {
		return this.basic;
	}

	@Override
	public boolean isOk() {
		return errorCode==0;
	}

	@Override
	public int getCode() {
		return errorCode;
	}

	@Override
	public String getMessage() {
		return null;
	}

	@Override
	public String getDetails() {
		return null;
	}

	@Override
	public ExceptionLevel getLevel() {
		return ExceptionLevel.INFO;
	}

	@Override
	public String getGoUrl() {
		return null;
	}
}
